import http from '../../utils/httpRequest'

export default {
  getAttrGroupPaginationByCondition (categoryId, currentPage = 1, size = 10,attrGroupName,attrGroupId) {
    return http({
      url: `/pms/attrgroup/getAttrGroupPaginationByCondition/${currentPage}/${size}`,
      method:'post',
      data:{
        catelogId:categoryId,
        attrGroupName,
        attrGroupId
      }
    })
  },
  /**
   * 通过catelogId获取到attrGroupList，再将与该attrGroup有关联的attr封装到本attrGroupList中
   * attrType = 1 是查询基本属性
   * attrType = 0 查询销售属性 （不可以这样查询，因为销售属性没有个属性分组关联）
   * */
  getAttrGroupAndItsAttrList(catelogId,attrType){
    return http({
      url:`/pms/attrgroup/getAttrGroupAndItsAttrList/${catelogId}`,
      method:'post',
      data:{
        attrType
      }
    });
  }

}
